home *** CD-ROM | disk | FTP | other *** search
Wrap
card_3055.xml <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" > <card> <id>3055</id> <filler1>0</filler1> <bitmap>BMAP_3273.pbm</bitmap> <cantDelete> <false /> </cantDelete> <showPict> <true /> </showPict> <dontSearch> <false /> </dontSearch> <owner>2661</owner> <link rel="stylesheet" type="text/css" href="stylesheet_2375.css" /> <part> <id>1</id> <type>field</type> <visible> <true /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <true /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>69</left> <top>68</top> <right>434</right> <bottom>252</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Geneva</font> <textSize>9</textSize> <textStyle>plain</textStyle> <textHeight>12</textHeight> <name></name> <script></script> </part> <part> <id>5</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>119</left> <top>282</top> <right>243</right> <bottom>316</bottom> </rect> <style>roundrect</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <true /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>FileToRes</name> <script>on mouseUp answer file "Please select file:" if it ≠ empty then put it into FileName ask "Name of the resource ?" with "NewData" if it ≠ empty then FileToRes FileName,it if the result ≠ empty then answer the Result else answer "Resource successfully created" end if end if end mouseUp </script> </part> <part> <id>8</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <true /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <true /> </lockText> <rect> <left>131</left> <top>9</top> <right>377</right> <bottom>273</bottom> </rect> <style>shadow</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Geneva</font> <textSize>12</textSize> <textStyle>bold</textStyle> <textHeight>16</textHeight> <name></name> <script></script> </part> <part> <id>11</id> <type>button</type> <visible> <false /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>135</left> <top>13</top> <right>148</right> <bottom>26</bottom> </rect> <style>rectangle</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <true /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name></name> <script>on mouseUp lock Screen hide btn 2 hide cd fld 2 hide cd fld 3 end mouseUp </script> </part> <part> <id>16</id> <type>field</type> <visible> <false /> </visible> <dontWrap> <false /> </dontWrap> <dontSearch> <false /> </dontSearch> <sharedText> <false /> </sharedText> <fixedLineHeight> <true /> </fixedLineHeight> <autoTab> <false /> </autoTab> <lockText> <false /> </lockText> <rect> <left>156</left> <top>18</top> <right>354</right> <bottom>262</bottom> </rect> <style>scrolling</style> <autoSelect> <false /> </autoSelect> <showLines> <false /> </showLines> <wideMargins> <false /> </wideMargins> <multipleLines> <false /> </multipleLines> <reservedFamily> 0 </reservedFamily> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>left</textAlign> <font>Geneva</font> <textSize>10</textSize> <textStyle>plain</textStyle> <textHeight>13</textHeight> <name></name> <script></script> </part> <part> <id>17</id> <type>button</type> <visible> <true /> </visible> <reserved5> 0 </reserved5> <reserved4> 0 </reserved4> <reserved3> 0 </reserved3> <reserved2> 0 </reserved2> <reserved1> 0 </reserved1> <enabled> <true /> </enabled> <rect> <left>320</left> <top>282</top> <right>444</right> <bottom>316</bottom> </rect> <style>roundrect</style> <showName> <true /> </showName> <highlight> <false /> </highlight> <autoHighlight> <true /> </autoHighlight> <sharedHighlight> <true /> </sharedHighlight> <family>0</family> <titleWidth>0</titleWidth> <icon>0</icon> <textAlign>center</textAlign> <font>Chicago</font> <textSize>12</textSize> <textStyle>plain</textStyle> <name>ResToFile</name> <script>on mouseUp ask file "Create file:" with "New file" if it ≠ empty then put it into FileName ask "Name of the resource ?" with "TestStack" if it ≠ empty then put it into DATAName ResToFile FileName,DATAName if the result ≠ empty then if first word of the Result is "Error" then answer the Result else put the Result into FileName end if if DATAName is "TestStack" then go stack FileName end if end if end mouseUp </script> </part> <content> <layer>card</layer> <id>1</id> <text><span class="style1"> </span><span class="style2">FileMaker stack 1.3</span><span class="style1"> </span><span class="style3">by Frédéric RINALDI</span><span class="style1"> </span><span class="style4">DESCRIPTION</span><span class="style1"> FileMaker is a set of two XCMDs : FileToRes and ResToFile. These two externals allow to create any type of document, empty or already filled, from within a script and reopen it with the original application. </span><span class="style2">FileToRes 1.3</span><span class="style1"> </span><span class="style4">SYNTAX</span><span class="style1"> FileToRes <file path or name>,<DATA res name>[,<dest file>] </span><span class="style4">PARAMETERS</span><span class="style1"> </span><span class="style2"><file path or name></span><span class="style1"> can be a single name or whole pathname. If just a single name is supplied, the file will be searched in the same folder as the current stack. </span><span class="style2"><DATA res name></span><span class="style1"> is the name of the DATA resource to create. </span><span class="style2"><dest file></span><span class="style1"> is the destination file pathname where the DATA resource will be created. If omited, current stack is used. Using "!", "?" and "=" as first parameter will return an online help (resp. copyright, syntax and output). </span><span class="style4">USING</span><span class="style1"> The XCMD can generate DATA resource from any kind of file with no resource fork. Along with the datas, the file type, creator and flags are put in the DATA resource in order for ResToFile XCMD to regenerate exactly the same file than the original. If a DATA resource already exists with the same name, a dialog will be prompted for the user to choose to rename, replace or cancel. If rename is choosen, a second dialog will ask for the new name, and the Result will return the changed name. With replace, the previous resource will be overwritten. If you plan to capture a stack, compact it before in order to get the smallest resource as possible. </span><span class="style4">ERRORS</span><span class="style1"> If an error occurs, the Result can return : "Error : Not a file" "Error : Not a folder" "Error : Alias file not supported" "Error : Volume not found" "Error : Bad Name" "Error : File not found" "Error : Folder not found" "Error : File is busy" "Error : I/O Error" "Error : Folder is full" "Error : Volume is locked" "Error : No resource fork" "Error : Duplicate file/folder name" "Error : Moving whole volume not allowed" "Error : Not an AppleShare volume" "Error : AppleShare insufficient privileges" "Error : Missing or empty parameter(s)" "Error : Creation aborted" "Error : Old DATA res could't be removed" "Error : Couldn't clear DATA resource" "Error : Creation aborted" "Error : This file has a resource fork" "Error : Out of memory" "Error : Couldn't build resource" "Error : Couldn't create DATA resource" </span><span class="style4">HISTORY</span><span class="style1"> </span><span class="style2">1.3</span><span class="style1"> </span><span class="style2">09/22/93</span><span class="style1"> • Fixed resource fork update when DATA added to current stack • Added dest file parameter </span><span class="style2">1.2</span><span class="style1"> </span><span class="style2">12/25/91</span><span class="style1"> • Fixed alias file bug under System 7.0.1 </span><span class="style2">1.1</span><span class="style1"> </span><span class="style2">08/04/91</span><span class="style1"> • Added support for System 7.0 alias files • General enhancement of the code • Added "=" param for online help </span><span class="style2">ResToFile</span><span class="style1"> </span><span class="style2">1.3</span><span class="style1"> </span><span class="style4">SYNTAX</span><span class="style1"> ResToFile <name or pathName>,<DATA res name>[,<prov file>] </span><span class="style4">PARAMETERS</span><span class="style1"> </span><span class="style2"><file path or name></span><span class="style1"> can be a single name or whole pathname. If just a single name is supplied, the file is assumed to be in the same folder than the current stack. </span><span class="style2"><DATA res name> </span><span class="style1">is the name of the DATA resource which will be used to re-create the original file. </span><span class="style2"><prov file></span><span class="style1"> is the provenance file pathname where the DATA resource will be loaded from. If omited, current stack is used. Using "!", "?" and "=" as first parameter will return an online help (resp. copyright, syntax and output). </span><span class="style4">USING</span><span class="style1"> The XCMD uses DATA resource previously created by FileToRes XCMD to rebuild the whole file. Since file type, creator and flags were preserved, the rebuilt file is exactly the same than the original. If a file already exists with the same name, a dialog will be prompted for the user to choose to rename, replace or cancel. If rename is choosen, a second dialog will ask for the new name, and the Result will return the changed name. With replace, the previous file will be overwritten. </span><span class="style4">ERRORS </span><span class="style1"> If an error occurs, the Result can return : "Error : Not a file" "Error : Not a folder" "Error : Alias file not supported" "Error : Volume not found" "Error : Bad Name" "Error : File not found" "Error : Folder not found" "Error : File is busy" "Error : I/O Error" "Error : Folder is full" "Error : Volume is locked" "Error : No resource fork" "Error : Duplicate file/folder name" "Error : Moving whole volume not allowed" "Error : Not an AppleShare volume" "Error : AppleShare insufficient privileges" "Error : Missing or empty parameter(s)" "Error : DATA resource not found" "Error : No more disk space" "Error : Creation aborted" </span><span class="style4">HISTORY</span><span class="style1"> </span><span class="style2">1.3</span><span class="style1"> </span><span class="style2">09/22/93</span><span class="style1"> • Added prov file parameter </span><span class="style2">1.2</span><span class="style1"> </span><span class="style2">12/25/91</span><span class="style1"> • Fixed alias file bug under System 7.0.1 </span><span class="style2">1.1</span><span class="style1"> </span><span class="style2">08/04/91</span><span class="style1"> • Added support for System 7.0 alias files • General enhancement of the code • Added "=" param for online help </span><span class="style4">TESTING</span><span class="style1"> To test these XCMDs, just click on buttons below. A DATA resource named "TestStack" is already in the stack for testing purpose. It will create a stack template with two cards, script and objects. -------------------------------------------------------------------- </span><span class="style5"> All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present : </span><span class="style1"> </span><span class="style3"> FileToRes & ResToFile XCMDs, © Frederic Rinaldi, 1989…1993. Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses: </span><span class="style1"> </span><span class="style6">AppleLink</span><span class="style3">: RINALDI1 </span><span class="style6">CalvaCom</span><span class="style3"> : FR10 </span><span class="style6">Compuserve</span><span class="style3"> : 71170,2111 </span><span class="style6"> Internet</span><span class="style3"> : RINALDI1@APPLELINK.APPLE.COM</span></text> </content> <content> <layer>card</layer> <id>8</id> <text> </text> </content> <content> <layer>card</layer> <id>16</id> <text>This XFCN is FreeWare,allowing unlimitted use in any non-commercial stack. You just need in this case to mention the author's name in the stack. Any commercial use must be licenced and aknowledged by the author.</text> </content> <name></name> <script></script> </card>